﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IItemsUseCase.cs" company="">
//   
// </copyright>
// <summary>
//   The items use case item.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Libium.UseCases
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    ///   The items use case item.
    /// </summary>
    public class ItemsUseCaseItem
    {
        #region Fields

        /// <summary>
        ///   The type name.
        /// </summary>
        public string TypeName;

        /// <summary>
        ///   The use case.
        /// </summary>
        public IUseCase UseCase;

        #endregion
    }

    /// <summary>
    ///   The ItemsUseCase interface.
    /// </summary>
    public interface IItemsUseCase : IUseCase
    {
        #region Public Events

        /// <summary>
        ///   The item added.
        /// </summary>
        event Action<IItemsUseCase, ItemsUseCaseItem> ItemAdded;

        /// <summary>
        ///   The item deleted.
        /// </summary>
        event Action<IItemsUseCase, ItemsUseCaseItem> ItemDeleted;

        #endregion

        #region Public Properties

        /// <summary>
        ///   Gets the items.
        /// </summary>
        IEnumerable<ItemsUseCaseItem> Items { get; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The add item.
        /// </summary>
        /// <param name="typeName">
        /// The type name. 
        /// </param>
        /// <param name="useCase">
        /// The use case. 
        /// </param>
        void AddItemUseCase(string typeName, IUseCase useCase);

        #endregion
    }
}